package com.hbk.controller;

import com.hbk.base.common.CommonResult;
import com.hbk.param.SchoolItemParam;
import com.hbk.service.ISchoolItemService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/api/schoolItem")
public class SchoolItemController {

    @Resource
    private ISchoolItemService schoolItemService;

    @RequestMapping("/add")
    public CommonResult add(SchoolItemParam.AddParam param){
        return schoolItemService.add(param);
    }

    @RequestMapping("/modify")
    public CommonResult modify(SchoolItemParam.ModifyParam param){
        return schoolItemService.modify(param);
    }

    @RequestMapping("/listAll")
    public CommonResult listAll(){
        return schoolItemService.listAll();
    }

    @RequestMapping("/delete")
    public CommonResult delete(SchoolItemParam.DeleteParam param){
        return schoolItemService.delete(param);
    }

}
